'use strict'

module.exports = (appInfo) => {
  const dbName = 'wly_jd'
  const tablePrefix = 'wly_jd'
  const host = `http://36.137.108.207:7102`

  const config = {
    host,
    client: `${host}/client`,
    h5: `${host}/h5`,
    dbName,
  }

  config.cluster = {
    listen: {
      path: '',
      port: 7001,
      hostname: '0.0.0.0',
    },
  }

  /**
   * MongoDb
   */
  config.jax = { mongoose: { prefix: tablePrefix } }
  config.mongodb = `mongodb://OUMyL8DYxEBT:L4UObRAUfXa@127.0.0.1:1717/${dbName}?authSource=admin`
  // config.mongodb = `mongodb://root:6a9L4EOXqtN3@121.36.89.63:1717/${dbName}?authSource=admin`
  config.mongoose = {
    url: config.mongodb,
  }

  // 微信
  config.wechat = {
    // 微信小程序
    miniProgram: {
      envVersion: 'release',
    },
  }

  return config
}
